package fieldssetter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;

import junit.framework.Assert;

import org.junit.Test;

public class DateSetter {

	@Test
	public void test() throws ParseException {
		String dateStr = "201406";
		Calendar c = Calendar.getInstance();
		c.setTime(new SimpleDateFormat("yyyyMM").parse(dateStr));
		Assert.assertEquals(5, c.get(Calendar.MONTH));
	}

}
